package com.foreknow.dao;

import com.foreknow.bean.Guestbook;

import java.sql.SQLException;
import java.util.List;

public interface GuestbookDao {
    /**
     * 添加信息
     * @param guestbook
     * @return
     */
    public int add (Guestbook guestbook) throws SQLException;

    /**
     * 修改
     * @param guestbook
     * @return
     * @throws SQLException
     */
    public int update (Guestbook guestbook) throws SQLException;

    /**
     * 删除
     * @param id
     * @return
     * @throws SQLException
     */
    public int delete (Integer id) throws SQLException;

    /**
     * 查询信息
     * @param id
     * @param
     * @return
     */
    public Guestbook query (Integer id) throws SQLException;

    /**
     * 模糊查询
     * @return
     * @throws SQLException
     */
    public List<Object> mohuquery (String name) throws SQLException;

    /**
     * 查询所有
     */
    public List<Object> allquery();
}
